package com.appleword.biz.book.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.appleword.biz.book.mapper.ApplewordBookGroupMapper;
import com.appleword.biz.book.domain.ApplewordBookGroup;
import com.appleword.biz.book.service.IApplewordBookGroupService;

/**
 * 书籍分组Service业务层处理
 * 
 * @author apple
 * @date 2024-05-13
 */
@Service
public class ApplewordBookGroupServiceImpl implements IApplewordBookGroupService 
{
    @Autowired
    private ApplewordBookGroupMapper applewordBookGroupMapper;

    /**
     * 查询书籍分组
     * 
     * @param id 书籍分组主键
     * @return 书籍分组
     */
    @Override
    public ApplewordBookGroup selectApplewordBookGroupById(Long id)
    {
        return applewordBookGroupMapper.selectApplewordBookGroupById(id);
    }

    /**
     * 查询书籍分组列表
     * 
     * @param applewordBookGroup 书籍分组
     * @return 书籍分组
     */
    @Override
    public List<ApplewordBookGroup> selectApplewordBookGroupList(ApplewordBookGroup applewordBookGroup)
    {
        return applewordBookGroupMapper.selectApplewordBookGroupList(applewordBookGroup);
    }

    /**
     * 新增书籍分组
     * 
     * @param applewordBookGroup 书籍分组
     * @return 结果
     */
    @Override
    public int insertApplewordBookGroup(ApplewordBookGroup applewordBookGroup)
    {
        return applewordBookGroupMapper.insertApplewordBookGroup(applewordBookGroup);
    }

    /**
     * 修改书籍分组
     * 
     * @param applewordBookGroup 书籍分组
     * @return 结果
     */
    @Override
    public int updateApplewordBookGroup(ApplewordBookGroup applewordBookGroup)
    {
        return applewordBookGroupMapper.updateApplewordBookGroup(applewordBookGroup);
    }

    /**
     * 批量删除书籍分组
     * 
     * @param ids 需要删除的书籍分组主键
     * @return 结果
     */
    @Override
    public int deleteApplewordBookGroupByIds(Long[] ids)
    {
        return applewordBookGroupMapper.deleteApplewordBookGroupByIds(ids);
    }

    /**
     * 删除书籍分组信息
     * 
     * @param id 书籍分组主键
     * @return 结果
     */
    @Override
    public int deleteApplewordBookGroupById(Long id)
    {
        return applewordBookGroupMapper.deleteApplewordBookGroupById(id);
    }
}